package com.acme;

public class Bank {
    private static int Max_Clients = 10;
    private Client[] clients= new Client[Max_Clients];

    public Bank(Client[] clients){
    	for (int i = 0; i < clients.length; i++) {
   				this.clients[i] = clients[i];
        }
    	
    }
    
    public void addClient(Client newClient) {
    	for (int i = 0; i < Max_Clients; i++) {
    		if (clients[i] == null) {
   				clients[i] = newClient;
               	break;
            }
        }
    }
    
    public Client getClients(String clientName) {
    	Client client_return = null;
       	for (int i = 0; i < Max_Clients; i++) {
           		if (clients[i].getName().equals(clientName)) {
       			client_return = clients[i];
       			break;
       		}
       	}
       	return client_return;
    }
    public Client[] getClients() {
    	return clients;
    }
}
